<function rtichoke.helpers.sandbox_observable_helpers.create_aj_data_combinations(reference_groups, fixed_time_horizons, stratified_by, by)>
Here is a Python code cell:
preds_aft: type=<class 'pandas.core.series.Series'>, dimensions=1
pred_1_5: type=<class 'pandas.core.series.Series'>, dimensions=1
pred_thin: type=<class 'pandas.core.series.Series'>, dimensions=1
preds_aft
0 1.000000
1 0.526737
2 1.000000
3 1.000000
4 1.000000
...
745 0.999975
746 0.999789
747 0.997182
748 1.000000
749 1.000000
Length: 750, dtype: float64
pred_thin
0 0.988965
1 0.524577
2 0.991665
3 0.994338
4 0.992105
...
745 0.984451
746 0.980313
747 0.967938
748 0.992703
749 0.993183
Length: 750, dtype: float64
viewof time_horizon = Inputs.range(
[1, 5],
{value: 3, step: 2, label: "Time Horizon:"}
)
viewof reference_group = Inputs.radio(
reference_groups_data, {label: "Reference Group"}, {value: 'thin'}
)
viewof stratified_by = Inputs.radio(
["probability_threshold", "ppcr"], {value: "probability_threshold", label: "Stratified By"}
)
viewof censored_assumption = Inputs.radio(
["excluded", "adjusted"], {value: "excluded", label: "Censored Assumption"}
)
viewof competing_assumption = Inputs.radio(
["excluded", "adjusted_as_negative", "adjusted_as_censored", "reals"], {value: "excluded", label: "Competing Assumption"}
)
filtered = transpose(data).filter(function(subset) {
return time_horizon == subset.fixed_time_horizon &&
censored_assumption == subset.censoring_assumption &&
competing_assumption == subset.competing_assumption &&
stratified_by === subset.stratified_by &&
reference_group === subset.reference_group;
})
filtered
Plot.plot({
marks: [
Plot.barY(filtered, {
x: "strata",
y: "reals_estimate",
fill: "reals",
tip: true
})
],
color: {
domain: ["real_positives", "real_competing", "real_negatives", "real_censored"],
range: ["#009e73", "#9DB4C0", "#FAC8CD", "#E3F09B"],
legend: true
}
})
| 0 |
(0.99, 1.0] |
| 1 |
(0.99, 1.0] |
| 2 |
(0.99, 1.0] |
| 3 |
(0.99, 1.0] |
| 4 |
(0.99, 1.0] |
| ... |
... |
| 11851 |
0.57 |
| 11852 |
0.73 |
| 11853 |
0.73 |
| 11854 |
0.73 |
| 11855 |
0.73 |
11856 rows × 1 columns